package com.javase.generics;

/**
 * @Auther: liyanhao
 * @Description: 泛型示例
 * @Date: 2022/5/18 12:52
 * @Version: v1.0
 */
public class GenericsDemo {

    public static <E> void printArray(E[] inputArray) {
        for (E element: inputArray) {
            System.out.printf( "%s ", element );
        }
    }
}
class Box<T> {
    private T t;

    public void add(T t) {
        this.t = t;
    }
    public T get(){
        return t;
    }
}
